package com.pattern.factory.factorymethod.pizza.order;

import com.pattern.factory.factorymethod.pizza.BJCheesePizza;
import com.pattern.factory.factorymethod.pizza.BJPepperPizza;
import com.pattern.factory.factorymethod.pizza.Pizza;

/**
 * @author 冯志立
 * @create 2019-10-17 15:41
 */
public class BJOrderPizza extends OrderPizza {

    @Override
    Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("cheese")){
            pizza = new BJCheesePizza();
        } else if (orderType.equals("pepper")){
            pizza = new BJPepperPizza();
        }
        return pizza;
    }
}
